package com.hoshiicloud.suppplier.feign.hystrix;

import com.hoshiicloud.common.query.UploadFileResponse;
import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.user.entity.supppiler.ResizePictureRequest;
import com.hoshiicloud.suppplier.feign.FileObjectFeignService;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * @Author:campchen
 * @Date:Created in 下午 02:13 2019/9/16
 * @PACKAGENAME com.hoshiicloud.suppplier.feign.hystrix
 * @Description
 */
@Component
public class HystrixFileObjectFeignFallback implements FileObjectFeignService {
    @Override
    public Response<UploadFileResponse> uploadFile(String bucketName, String objectKey, String fileName, String folder, Boolean privateOwned, MultipartFile file) {
        return Response.failed("指定路径上传一个文件失败");
    }


    @Override
    public Response resizePicture(ResizePictureRequest param) {
        return Response.failed("对图片进行缩放，转换格式，压缩处理失败");
    }

    @Override
    public void downloadFile(String bucketName, String objectKey, HttpServletResponse response) {
    }
}
